<?php



class docEditExample   extends bee\form
{ protected static $__formID = "frm201110060039";
  public $__caption = "Document edit example page";
  public $__version = "0.1";
  protected $doc;

  public $id;
  public $name;
  public $description;

  public function createForm($evt)
  {

    $this->doc= new bee\document();
    $this->doc->SELECT($evt["id"]);
    $this->id = new bee\text("id", $this->doc->id);
    $this->name = new bee\text("name", $this->doc->name);
    $this->description = new bee\text("description", $this->doc->description);
  }

  public function onDraw($evt)
  { static::$DSDoc->setRow($this->doc, "doc");
  }

  public function update($evt)
  { $this->doc->fillFromArray();
    $this->doc->UPDATE();
  }
}
